<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>

    <script>
      var monthStr = prompt("请输入月份");
      var month = Number.parseInt(monthStr);

      switch (month) {
        case 3:
        case 4:
        case 5:
          console.log("春季");
          break;
        case 6:
        case 7:
        case 8:
          console.log("夏季");
          break;
        case 9:
        case 10:
        case 11:
          console.log("秋季");
          break;
        case 12:
        case 1:
        case 2:
          console.log("春季");
          break;
          default:
            console.log("输入有误~");
      }
    </script>
  </head>
  <body></body>
</html>
